﻿using NMock2;
using Pagination.RangeCollector;

namespace Tests.Expectations.Pagination
{
    public static class RangeCollectorExpectations
    {
        public static void ExpectRange(this IRangeCollector mock, params object[] elements)
        {
            foreach (var element in elements)
            {
                Expect.Once.On(mock)
                .Method("Append")
                .With((int)element)
                .Will();
            }

            Expect.Once.On(mock)
                .Method("End")
                .WithNoArguments()
                .Will();
            
        }
    }
}